{include file='_header'}

<div class="page-header">
    当前位置：<span class="text-primary">{if $status=='0'}商户入驻申请中 {else}商户入驻申请驳回 {/if}</span>
</div>
<div class="page-content">
    <form action="" method="get" class="form-horizontal" role="form" id="form1">
        <div class="page-toolbar m-b-sm m-t-sm">
             <span class='pull-left'>
                <a class='btn btn-primary btn-sm' href="{:url('admin/merch/add')}"><i class="fa fa-plus"></i> 添加商户</a>
            </span>
            <div class="col-sm-6 pull-right">
                <div class="input-group">
                    <!-- <div class="input-group-select">
                        <select name='status' class='form-control  input-sm select-md' style="width:100px;"  >
                            <option value=''>状态</option>
                            <option value='0' {if $status=='0'}selected{/if}>申请中</option>
                            <option value='-1' {if $status=='-1'}selected{/if}>驳回</option>
                        </select>
                    </div> -->
                    <input type="text" class="form-control input-sm"  name="keyword" value="{$keyword}" placeholder="商户名称/联系人/手机号"/>
				    <span class="input-group-btn">
                        <button class="btn btn-primary" type="submit"> 搜索</button>
				    </span>
                </div>
            </div>
        </div>
    </form>
    {if empty(count($list))}
    <div class='panel panel-default'>
        <div class='panel-body' style='text-align: center;padding:30px;'>
            暂时没有任何入驻申请!
        </div>
    </div>
    {else}
    <div class="page-table-header">
        <input type="checkbox">
        <span   class="btn-group">
            <button class="btn btn-default btn-sm btn-operation" type="button" data-toggle='batch-remove' data-confirm="确认要删除?" data-href="{:url('admin/merch/regdelete')}">
                <i class='icow icow-shanchu1'></i> 删除
            </button>
        </span>
    </div>
    <table class="table table-hover table-responsive">
        <thead class="navbar-inner" >
        <tr>
            <th style="width:25px;"></th>
            <th>商户名称</th>
            <th>主营项目</th>
            <th>联系人</th>
            <th>申请时间</th>
            <th>申请状态</th>
            <th style='width:65px;'>操作</th>
        </tr>
        </thead>
        <tbody>
        {foreach name='list' item='row'}
        <tr rel="pop" data-title="ID: {$row['id']} ">
            <td>
                <input type='checkbox'   value="{$row['id']}"/>
            </td>
            <td>{$row['merchname']}</td>
            <td>{$row['salecate']}</td>
            <td>{$row['realname']}<br/>{$row['mobile']}</td>
            <td>{:date('Y-m-d', $row['applytime'])}<br/>{:date('H:i', $row['applytime'])}</td>
            <td>
                {if $row['status']==0}
               <span class="label label-primary"> 申请中</span>
                {elseif $row['status']==-1}
                <span class="label label-danger"> 驳回申请</span>
                {/if}
            </td>
            <td  style="overflow:visible;">
                <a  href="{:url('admin/merch/regdetail', array('id' => $row['id']))}" class="btn btn-default btn-sm btn-op btn-operation" >
                   <span data-toggle="tooltip" data-placement="top" title="" data-original-title="处理申请">
                        <i class='icow icow-bianji2'></i>
                   </span>
                </a>
                <a data-toggle='ajaxRemove' href="{:url('admin/merch/regdelete', array('id' => $row['id']))}"class="btn btn-default btn-sm btn-operation btn-op" data-confirm='确认要删除此商户吗?'>
                    <span data-toggle="tooltip" data-placement="top" title="" data-original-title="删除">
                         <i class='icow icow-shanchu1'></i>
                    </span>
                </a>
            </td>
        </tr>
        {/foreach}
        </tbody>
        <tfoot>
            <tr>
                <td><input type="checkbox"></td>
                <td>
                    <div class="input-group-btn">
                        <button class="btn btn-default btn-sm btn-operation" type="button" data-toggle='batch-remove' data-confirm="确认要删除?" data-href="{:url('admin/merch/regdelete')}">
                            <i class='icow icow-shanchu1'></i> 删除
                    </div>
                </td>
                <td class="text-right" colspan="5">
                    {$pager}
                </td>
            </tr>
        </tfoot>
    </table>
    {/if}
</div>
{include file='_footer'}